import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("fa_admin",{schema:"fastadmin" } )
@Index("username",["username",],{unique:true})
export class fa_admin {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("varchar",{ 
        nullable:false,
        unique: true,
        length:20,
        name:"username"
        })
    username:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:50,
        name:"nickname"
        })
    nickname:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:32,
        name:"password"
        })
    password:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:30,
        name:"salt"
        })
    salt:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:100,
        name:"avatar"
        })
    avatar:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:100,
        name:"email"
        })
    email:string;
        

    @Column("tinyint",{ 
        nullable:false,
        default: () => "'0'",
        name:"loginfailure"
        })
    loginfailure:number;
        

    @Column("int",{ 
        nullable:true,
        name:"logintime"
        })
    logintime:number | null;
        

    @Column("int",{ 
        nullable:true,
        name:"createtime"
        })
    createtime:number | null;
        

    @Column("int",{ 
        nullable:true,
        name:"updatetime"
        })
    updatetime:number | null;
        

    @Column("varchar",{ 
        nullable:false,
        length:59,
        name:"token"
        })
    token:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:30,
        default: () => "'normal'",
        name:"status"
        })
    status:string;
        
}
